#pragma once
#include "XnccType.h"
namespace xncc {
namespace shared {
    enum class XNCC_ADDR_TYPE : uint8_t
    {
        IPV4_TCP    = 1,
        IPV6_TCP    = 2,
        IPV4_UDP    = 3,
        IPV6_UDP    = 4,
        UNIX_DOMAIN = 5,
        SHM         = 6,
        UNKNOWN     = 255,
    };

    enum class XNCC_SERVER_TYPE : uint8_t
    {
        STREAM  = 1,
        DGRAM   = 2,
        UNKNOWN = 255,
    };

    enum class XNCC_CLIENT_TYPE : uint8_t
    {
        STREAM  = 1,
        DGRAM   = 2,
        UNKNOWN = 255,
    };

    namespace InnerMsgId {
        enum Value : types::message_id_t
        {
            ON_NULL,
            ON_CONNECTED,
            ON_DISCONNECTED,
            ON_PUB_IPC_MSG,
            MAX_INNER_MSG_ID
        };
        inline const char* toString(const types::message_id_t msg_id)
        {
            switch (msg_id) {
                case ON_NULL: return "ON_NULL";
                case ON_CONNECTED: return "ON_CONNECTED";
                case ON_DISCONNECTED: return "ON_DISCONNECTED";
                case ON_PUB_IPC_MSG: return "ON_PUB_IPC_MSG";
                default: return "UNKNOWN";
            }
            return "UNKNOWN";
        }
    }  // namespace InnerMsgId

}  // namespace shared
}  // namespace xncc